import {fileterMsg} from '@/utils/chat.js'
//参数(环信返回的消息体，推送类型)
export default (data,type) =>{
	console.log('push.js,准备推送');
	//if(type == 'group'){
		//推送内容
		let pushMsg = data.ext.name + ":" + fileterMsg(data);
		//扩展字段
		let extra = {
			type:type, //后面会根据这个做页面跳转
			groupId:data.to,
			orderId:data.ext.orderId?data.ext.orderId:''
		};
		//参数
		let options = {
			cover:false, //是否覆盖上一条推送
			title:data.ext.title //推送的标题
		};
		//推送
		plus.push.createMessage(pushMsg,JSON.stringify(extra),options);
	//}
}

//示例：push(data,'group')
